package com.app.domain;

import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class UploadJsonResult {
    /**
     * 响应状态code，默认1为响应成功，所以此处默认为1
     */
    private Integer code = 1;
    private String idstr;
    public static UploadJsonResult ok(String idstr) {
        return result(1,idstr);
    }
    public static UploadJsonResult error(String idstr) {
        return result(0,idstr);
    }
    public static UploadJsonResult result( Integer code, String idstr) {
        UploadJsonResult jsonResult = new UploadJsonResult();
        jsonResult.setCode(code);
        jsonResult.setIdstr(idstr);
        return jsonResult;
    }
}
